diff options
| author | Adam Soltys <[email protected]> | 2023-11-09 16:49:10 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-11-11 00:04:22 -0800 |
| commit | efdbc67c17fab67bf3cdce448a30aa82f62c5212 (patch) | |
| tree | 8af4f6245ea63e0b8a2d36f5da88439fc8d38ff7 /src/routes/(app)/fund/[id]/+page.server.js | |
| parent | 9d554851a47ca9b4efd38f2682f313bd2623f8bf (diff) | |
| download | coinos-ui-efdbc67c17fab67bf3cdce448a30aa82f62c5212.tar.gz coinos-ui-efdbc67c17fab67bf3cdce448a30aa82f62c5212.zip | |
funds
Diffstat (limited to 'src/routes/(app)/fund/[id]/+page.server.js')
| -rw-r--r-- | src/routes/(app)/fund/[id]/+page.server.js | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/routes/(app)/fund/[id]/+page.server.js b/src/routes/(app)/fund/[id]/+page.server.js deleted file mode 100644 index 4194deed..00000000 --- a/src/routes/(app)/fund/[id]/+page.server.js +++ /dev/null @@ -1,23 +0,0 @@ -import { error, redirect } from '@sveltejs/kit'; -import { auth, get, post } from '$lib/utils'; -import Qr from 'qrcode-base64'; - -export let load = async ({ params: { id }, url }) => { - let { amount, payments } = await get(`/fund/${id}`); - - let src = Qr.drawImg(url.href, { size: 300 }); - return { amount, payments, src }; -}; - -export const actions = { - default: async ({ cookies, locals, params, request }) => { - let { user } = locals; - - if (user) { - await post('/redeem', params, auth(cookies)); - throw redirect(307, `/${user.username}/payments`); - } - - throw redirect(307, '/register'); - } -}; |
